import sqlite3
import os

if not os.path.exists("project_info.db"):
    conn = sqlite3.connect('project_info.db')
    c = conn.cursor()
    print("Opened database successfully")
    print("create table")
    c.execute('''CREATE TABLE Project
           (repository_link varchar(300) PRIMARY KEY NOT NULL,
            keyword        varchar(100)    ,
            create_time    char(50)       ,
            notify_times   integer);''')
    print("Table created successfully")
    exit(0)

else:
    pass


conn = sqlite3.connect('project_info.db')
c = conn.cursor()

cursor = c.execute("select * from project")
for row in cursor:
    print(row)
# conn.commit()
conn.close()